<?php

//  authenticate.php
//  Memento 3.0
//
//  Created by Christopher Burrows on 10-07-26
//  Copyright 2010 Team Memento. All rights reserved.
//
//    Description:
//  Receives a username and password via HTML POST, then
//  authenticates them by calling a function in
//  functions.php
//
//  10-07-26: File created (C. Burrows)
//
//  HTML POST Fields:
//  'username'  (string)
//  'password'  (string) [unencrypted]

include ($_SERVER['DOCUMENT_ROOT'].'/functions.php');

// Retrieve the username and password from POST
$username = $_POST['username'];
$password = md5($_POST['password']);

connect_to_database();
authenticate($username, $password);
  
?>
